#include <iostream>
#include <cstring>
using namespace std;

class Employee
{
	public :
		int m_id;
		string m_name;
	public :
		Employee(int id = 1010, string name = "Li Si") :
			m_id(id), m_name(name)
		{
			cout << "<Employee init()>" << endl;
		}

		virtual ~Employee()
		{
			cout << "<~Employee()>" << endl;
		}

		virtual void display()
		{
			cout << "Name : " << m_name << endl;
			cout << "Id   : " << m_id << endl;
		}
};

class Teacher : public Employee
{
	public :
		string m_subject;
	public :
		Teacher(int id = 1010, string name = "Wang Wu", string subject = "English") :
			Employee(id, name), m_subject(subject)
		{
			cout << "<Teacher init()>" << endl;
		}

		virtual ~Teacher()
		{
			cout << "<~Teacher()>" << endl;
		}

		void display()
		{
			Employee :: display();
			cout << "Sub  : " << m_subject << endl;
		}
};

int main()
{
	Employee *pe = new Teacher(1110, "Huang Liu", "Chinese");
	pe->display();
	delete pe;
}
